package com.guijq.selfcode.javacodeoptimize;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author yangjf
 * @time 2019-07-05 14:09
 */
public class SplitTest {
    public static void main(String[] args) {
        String regex = "^ab{1,3}+c$";
        String str = "abbc";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher = pattern.matcher(str);
        System.out.println(matcher.matches());
        //正则表达式 b{1，3}  会尽可能匹配最多的字符-----贪婪模式

    }
}
